const express = require('express')
const router = express.Router()

// 导入控制层
const inspectController = require('../controllers/inspectController')
// 表单验证插件
const { body, query } = require("express-validator")
// 引入中间件
const checkPermission = require('../middleware/checkPermission');
const auth = require('../middleware/auth');

router.post('/add', auth, checkPermission("housekeep_inspect_add"), inspectController.add)
router.get('/del_f', auth, checkPermission("housekeep_inspect_delete"), inspectController.del_f)
router.get('/del_t', auth, checkPermission("housekeep_inspect_delete"), inspectController.del_t)
router.get('/get', auth, checkPermission("housekeep_inspect_list"), inspectController.get)
router.post('/set', auth, checkPermission("housekeep_inspect_edit"), inspectController.set)
router.get('/list', auth, checkPermission("housekeep_inspect_list"), inspectController.list)
router.get('/allRoomId', inspectController.allRoomId)
module.exports = router